home *** CD-ROM | disk | FTP | other *** search
/ Champak 29 / Volume 29 - JOGO DISK .iso / Games / jungle_adventure.swf / scripts / __Packages / SSShapeInstance.as < prev    next >
Text File  |  2006-11-29  |  1KB  |  51 lines

  1. class SSShapeInstance extends SSObject
  2. {
  3.    var isInstance = true;
  4.    var assetID = null;
  5.    function SSShapeInstance(obj)
  6.    {
  7.       super();
  8.       this.world = null;
  9.       this.parent = null;
  10.       this.target = null;
  11.       this.isInstance = true;
  12.       this.inScene = false;
  13.       this.__proto__ = {__proto__:obj};
  14.       this.__proto__.queueForDisplay = SSShape.prototype.queueForDisplay;
  15.    }
  16.    function editor_onAddToDocument(doc, cn, args)
  17.    {
  18.       var _loc5_ = args[0];
  19.       var _loc3_ = doc.objects;
  20.       var _loc2_ = _loc3_.length;
  21.       var _loc4_ = undefined;
  22.       while((_loc2_ = _loc2_ - 1) > -1)
  23.       {
  24.          if(_loc3_[_loc2_].name == _loc5_)
  25.          {
  26.             _loc4_ = _loc3_[_loc2_];
  27.             break;
  28.          }
  29.       }
  30.       points = _loc4_.points;
  31.       if(!_loc4_.instances)
  32.       {
  33.          _loc4_.instances = [];
  34.       }
  35.       _loc4_.instances.push(this);
  36.    }
  37.    function editor_display()
  38.    {
  39.       this.target.clear();
  40.       this.target.beginFill(13408767,20);
  41.       this.target.moveTo(points[0].x,points[0].y);
  42.       var _loc2_ = points.length;
  43.       while((_loc2_ = _loc2_ - 1) > -1)
  44.       {
  45.          this.target.lineStyle(0,!points[_loc2_].props ? 8947848 : 16711680);
  46.          this.target.lineTo(points[_loc2_].x,points[_loc2_].y);
  47.       }
  48.       this.target.endFill();
  49.    }
  50. }
  51.